<?php
namespace app\index\validate;

use think\Validate;

class Doregister extends Validate{
	protected $rule = [
		'useId' => 'require|alphaNum|length:4,16',
        'userName' => 'require|chsAlphaNum|length:1,25',
        'password' => 'require|alphaNum|length:6,16',
        'isteacher' => 'require|boolean'
	];
	
	protected $message = [
        'useId.require'=>'账号不能为空',
        'useId.alphaNum'=>'账号只能包含数字、字母',
        'useId.length'=>'账号必须4-16个字符',
        'userName.require'=>'用户名不能为空',
        'userName.chsAlphaNum'=>'用户名只能包含汉字、数字和字母',
        'userName.length'=>'用户名必须1-25个字符',
        'password.require'=>'密码不能为空',
        'password.alphaNum'=>'密码只能包含字母、数字',
        'password.length'=>'密码必须6-16个字符',
        'isteacher.require' => '身份不能为空',
        'isteacher.boolean' => '格式有误' 
    ]; 
}

?>